package br.com.client;

import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 *
 * @author Wanderley Filho
 */
public class DialogBoxCadastro extends DialogBox {

    public DialogBoxCadastro() {
        super(false);
        setText("Cadastrado com sucesso!");
        
        Button btOk = new Button("OK");
        Label lMsg = new Label("Seu cadastro foi efetivado com sucesso!");
        
        VerticalPanel vPanel = new VerticalPanel();
        vPanel.add(lMsg);
        vPanel.add(btOk);
        
        setWidget(vPanel);
        setAnimationEnabled(true);
        setGlassEnabled(true);
        center();
        
        btOk.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                DialogBoxCadastro.this.hide();
            }
        });
    }

}
